package DataStructure.linear;

//只有数组或者迭代器可以通过foreach遍历
import java.util.Iterator;

public class SequenceListTest2 {
    public static void main(String[] args) {
        SequenceList2<String> sl = new SequenceList2<>(3);
        sl.insert("张三");
        sl.insert("李四");
        sl.insert("王五");
        sl.insert("赵六");
        int res = sl.indexof("赵六");
        System.out.println(res);

        /*for (String s:sl) {
            System.out.println(s);
        }*/

        /*Iterator<String> iterator = sl.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }*/


    }
}
